//
//  BKLayoutImgCollectionViewCell.m
//  bestkeep
//
//  Created by windCould on 16/11/10.
//  Copyright © 2016年 utouu. All rights reserved.
//

#import "BKLayoutImgCollectionViewCell.h"
#import "BKMyCommon.h"
@interface BKLayoutImgCollectionViewCell ()

@property (nonatomic,strong)UIImageView  * itemImgV;


@end

@implementation BKLayoutImgCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self setUpViews];
    }
    return self;
}

-(void)setUpViews
{
    _itemImgV = [[UIImageView alloc]initWithFrame:CGRectZero];
    _itemImgV.contentMode = UIViewContentModeScaleToFill;
    [self addSubview:_itemImgV];
    
    [self viewsLayOut];
}

-(void)viewsLayOut
{
    
   [_itemImgV mas_makeConstraints:^(MASConstraintMaker *make) {
       
       make.top.mas_equalTo(self.mas_top).offset(0);
       make.left.mas_equalTo(self.mas_left).offset(0);
       make.right.mas_equalTo(self.mas_right).offset(0);
       make.bottom.mas_equalTo(self.mas_bottom).offset(0);
   }];
    
}

-(void)setImgUrlStr:(NSString *)imgUrlStr
{
    _itemImgV.image = [UIImage imageNamed:imgUrlStr];
}

-(void)setImg:(UIImage *)img
{
    _itemImgV.image = img;
}

@end
